package com.jbp.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jbp.utils.PageUtils;
import com.jbp.utils.Query;

import com.jbp.dao.RoomCollectDao;
import com.jbp.model.RoomCollect;
import com.jbp.service.RoomCollectService;


@Service
public class RoomCollectServiceImpl extends ServiceImpl<RoomCollectDao, RoomCollect> implements RoomCollectService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<RoomCollect> page = this.page(
                new Query<RoomCollect>().getPage(params),
                new QueryWrapper<RoomCollect>()
        );

        return new PageUtils(page);
    }


    @Override
    public List<Integer> getRoomIds(Integer userId) {
        return baseMapper.getRoomIds(userId);
    }
}
